package com.dk.service.Impl;


import com.dk.mapper.UserMapper;
import com.dk.pojo.User;
import com.dk.service.UserService;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;
@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper Mapper;
    @Override
    public void save(User user) {

      Mapper.save(user);

    }

    @Override
    public List<User> FindAll() {
      return Mapper.FindAll();
    }

    @Override
    public User Login(String user, String password) {
        return Mapper.Login(user,password);
    }

    @Override
    public int Dele( String user) {
        return Mapper.Dele(user);
    }

    @Override
    public List<User> Find(String name) {
        return Mapper.Find(name);
    }

    @Override
    public void Xg(User user) {
        Mapper.Xg(user);
    }


}
